<?php
include_once("conn.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title> 飛羽主題攝影 </title>
<link href="css/main.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/btn.css"/>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.cycle.js"></script>
<script type="text/javascript" src="js/slideshow.js"></script>
	<script type="text/javascript">
	$(document).ready(function(){
		$(".hoverNews , .hoverWorking , .hoverGown , .hoverCos , .hoverLogo , .hoverLogo2 , .hoverAbout , .hoverInfor, .hoverOnline , .hoverContact").css("opacity","0");
		$(".hoverNews , .hoverWorking , .hoverGown , .hoverCos , .hoverLogo , .hoverLogo2 , .hoverAbout , .hoverInfor, .hoverOnline , .hoverContact").hover(function () {
			$(this).stop().animate({
				opacity: 1
			}, "fast");
		},
		function () {
			$(this).stop().animate({
				opacity: 0
			}, "fast");
		});
		});
	</script>
</head>
<body >
<div id="wrap"><!-- start #wrap //-->
<div id="main" class="clearfix"><!-- start #main //-->
<!-- start #top //-->
  <?php include_once('top.php');?>
<!-- end #top //-->
<div id="all"><!-- start #all //-->
<div class="ad">
<div id="slideshow" class="clearfix">

		<div class="slides clearfix">

			<ul class="clearfix">
<?php
 $sql = "select * from banner where enabled = 1 order by sort_index LIMIT 0,6";
            $result = mysql_query($sql);
            $index_images = array();
            while ($banner = mysql_fetch_assoc($result)) {
            $index_images[] = $banner;
            }
        ?>
  
<?php foreach($index_images as $ii_number=>$banner):?>
<li id="main-post-<?php echo $ii_number+1;?>">
<div >
<img src="<?php echo $banner['images'];?>"   />
</div>
</li>
<?php endforeach;?>

</ul>

</div>

		
		
		
		
		
<div>
<ul class="slides-nav">
			<?php foreach($index_images as $ii_number=>$banner):?>
			<li class="<?php if($ii_number == 0) echo "on ";?>clearfix" id="nav-post-<?php echo $ii_number+1;?>">
				<a href="#main-post-<?php echo $ii_number+1;?>" >
				 </a>
			</li>
			<?php endforeach;?>


		</ul>		
		
		
</div>		
		
		
		

	</div>
</div>
<div class="ad-l">
  <div class="ad-l-tit">
    <h1>News 最新消息</h1>
  </div>
  
  <div class="ad-l-con">
    <div class="ad-l-con1">
    
    <div class="ad-l-con1-t">
      <p class="ad-l-con1-t-data" > 2011/04/05</p>
        <p class="ad-l-con1-t-tit"><a href="#">標題標題標題標題標題標題標題標題</a></p>   
    </div>
    <img src="images/ad-l-line.gif" width="465" height="2" />
    
    <div class="ad-l-con1-t">
      <p class="ad-l-con1-t-data" > 2011/04/05</p>
        <p class="ad-l-con1-t-tit"><a href="#">標題標題標題標題標題標題標題標題</a></p>   
    </div>
    <img src="images/ad-l-line.gif" width="465" height="2" />
    
    <div class="ad-l-con1-t">
      <p class="ad-l-con1-t-data" > 2011/04/05</p>
        <p class="ad-l-con1-t-tit"><a href="#">標題標題標題標題標題標題標題標題</a></p>   
    </div>
    <img src="images/ad-l-line.gif" width="465" height="2" />
    
    <div class="ad-l-con1-t">
      <p class="ad-l-con1-t-data" > 2011/04/05</p>
        <p class="ad-l-con1-t-tit"><a href="#">標題標題標題標題標題標題標題標題</a></p>   
    </div>
    <img src="images/ad-l-line.gif" width="465" height="2" />
    
    <div class="ad-l-con1-t">
      <p class="ad-l-con1-t-data" > 2011/04/05</p>
        <p class="ad-l-con1-t-tit"><a href="#">標題標題標題標題標題標題標題標題</a></p>   
    </div>
    
    <img src="images/ad-l-line.gif" width="465" height="2" />
    
    <div class="ad-l-con1-t">
      <p class="ad-l-con1-t-data" > 2011/04/05</p>
        <p class="ad-l-con1-t-tit"><a href="#">標題標題標題標題標題標題標題標題</a></p>   
    </div>
    
    </div>
    </div>

</div>
<div class="ad-r">

<script language="javascript">
var globale_ad_r_control_current_index = 0;
var globale_ad_r_control_max_count = 0;
function ad_r_control_current_disselect_all()
{
	$('.ad-r-working div').hide();
}
function ad_r_control_current_select(ind)
{
	ad_r_control_current_disselect_all();
	$('.ad-r-working div:eq('+ind+')').show();
}
$(function(){
	$(".ad-r-control-prev").bind('click',function(){
		globale_ad_r_control_current_index--;
		if(globale_ad_r_control_current_index == -1)
			globale_ad_r_control_current_index = globale_ad_r_control_max_count -1;
		ad_r_control_current_select(globale_ad_r_control_current_index);
		return false;
	});
	$(".ad-r-control-next").bind('click',function(){
		globale_ad_r_control_current_index++;
		if(globale_ad_r_control_current_index == globale_ad_r_control_max_count)
			globale_ad_r_control_current_index = 0;
		ad_r_control_current_select(globale_ad_r_control_current_index);
		return false;
	});
	
	globale_ad_r_control_max_count = $('.ad-r-working div').size();
	if(globale_ad_r_control_max_count > 0)
		ad_r_control_current_select(0);
});
</script>
<div class="ad-r-tit">
    <h1>Show Room 客戶作品 </h1>
  </div>
  <div class="ad-r-con">
    <div class="ad-r-con1">
      <div class="ad-r-control"><a href="#" class="ad-r-control-prev"><img src="images/ad-r-control-prev.png" width="43" height="237" /></a></div>
      <div class="ad-r-working"> 
        <?php
           $sql = sprintf("SELECT `id`,`nid`,`title`,`BigClassName`,`images` FROM product2 WHERE BigClassName='%s' order by `addtime` DESC LIMIT 0,6", '客戶作品');
            $result = mysql_query($sql);
            $i = 0;
  			while( $row = mysql_fetch_assoc($result)) {
  			$i++;
        ?>
      	<div style="display:none">
        <a href="cos-working2.php?nid=<?php echo $row['nid'];?>&title=<?php echo urlencode($row['title']);?>"><img src="<?php echo $row['images'];?>" width="206" height="137" /></a>
        <h3><a href="cos-working2.php?nid=<?php echo $row['nid'];?>&title=<?php echo urlencode($row['title']);?>"><?php echo $row['title'];?></a></h3>
        <h4><?php echo $row['BigClassName'];?></h4>
        </div>
        <?php }?>
      </div>
      <div class="ad-r-control"><a href="#" class="ad-r-control-next"><img src="images/ad-r-control-next.png" width="43" height="237" /></a></div>
    </div>
    </div>

</div>

</div><!-- end #all //-->
</div><!-- end #main //-->
</div><!-- end #wrap //-->
<!-- start #footer //-->
  <?php include_once('down.php');?>
  <!-- end #footer //-->
</body>
</html>